<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of signup
 *
 * @author suman
 */
class Signup_controller extends Controller {
    public $signup_model;
    public function __construct() {
        parent::__construct();
        $this->signup_model = new Signup_model();
    }
    public function index() {
        $this->view("header");
        $this->view("menu");
        $this->view("signup_view");
        $this->view("footer");
        
    }
    
    public function add(){
        //validation
        $isValid = TRUE;
        if($isValid){
            if($this->signup_model->add($_POST)){
                //redirect to success
            }  else {
                //set error message
                $this->index();
            }
        }  else {
            $this->index();
        }
    }
            
}

?>
